/**********************************************
** @Author: phy
** @Date:   2017-12-12 14:17:37
** @Last Modified by:   phy
***********************************************/

package libs

import (
	"sync"
)
type xMutex  struct {
	gMutex *sync.Mutex;
}
type MyXmutex interface{
	XMutexLock()
	XMutexUnLock()
} 
func GetxMutex() (*xMutex){
	
	tMutex :=  new(sync.Mutex);
	tmpMutex := xMutex{
		gMutex:tMutex }
	return &tmpMutex;
}

func (x * xMutex) XMutexLock(){
	x.gMutex.Lock();
}
func (x * xMutex) XMutexUnLock() {
	x.gMutex.Unlock();
}